package com.dm.learn.java.bean;

import java.io.Serializable;
import java.lang.reflect.Field;
import java.util.Date;

public class Customer implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private Long id;
	private String uuid;
	private Integer refCustomerId;// 转介绍人id
	private Integer groupsId;// 群组Id
	private Integer isDemo;// 是否演示对象
	private Integer height;// 身高
	private Integer weight;// 体重
	// DAM20130827
	private String name;// 将firstname和lastname合并
	private String namePrefix;// 名字首字母
	private String portraitPath;// 头像路径
	private Integer sex;// 性别

	private String level;// 级别
	private String familyAddress;// 家庭住址
	private String familyPhone;// 家庭电话
	private String familyPostcode;// 家庭邮编
	private String companyName;// 公司名称
	private String companyPostcode;// 公司邮编
	private String companyAddress;// 公司地址
	private String companyPhone;// 公司电话
	private String jobTitle;// 职位
	private String jobDuty;// 职责
	private String cellPhone;// 手机
	private String email;// 邮箱
	private String qq;// qq
	private Date birthday;// 生日
	private Integer isConfirm;// 生日是否定0否
	private String title;// 称谓
	private Date createTime;// 创建事件
	private Integer careerCategory;// 职业类别
	private String hobbies;// 爱好
	private String character;// 个性
	private Date marriageTime;// 结婚日期
	private Integer isTopDemo;// 是否置顶
	private String nickname;// 昵称
	private Integer isRegular;// 是否正式客户0非正式1正式
	private Date regularChangedTime;// 正式/非正式转换时间
	private String bloodType;// 血型
	private String department;// 部门
	private Date updateTime;// 更新时间
	private Integer isMarrage;
	private String description;// 备注
	private String remark;// 描述

	/* 是否客户(0否/1是) */
	private Integer relationFlag;

	public Integer getRelationFlag() {
		return relationFlag;
	}

	public void setRelationFlag(Integer relationFlag) {
		this.relationFlag = relationFlag;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	// private Integer labelId;

	public String getUuid() {
		return uuid;
	}

	public void setUuid(String uuid) {
		this.uuid = uuid;
	}

	// public Integer getLabelId() {
	// return labelId;
	// }
	//
	// public void setLabelId(Integer labelId) {
	// this.labelId = labelId;
	// }
	public Integer getIsMarrage() {
		return isMarrage;
	}

	public void setIsMarrage(Integer isMarrage) {
		this.isMarrage = isMarrage;
	}

	public Date getUpdateTime() {
		return updateTime;
	}

	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}

	public String getDepartment() {
		return department;
	}

	public void setDepartment(String department) {
		this.department = department;
	}

	public String getBloodType() {
		return bloodType;
	}

	public void setBloodType(String bloodType) {
		this.bloodType = bloodType;
	}

	public Integer getIsRegular() {
		return isRegular;
	}

	public void setIsRegular(Integer isRegular) {
		this.isRegular = isRegular;
	}

	public Date getRegularChangedTime() {
		return regularChangedTime;
	}

	public void setRegularChangedTime(Date regularChangedTime) {
		this.regularChangedTime = regularChangedTime;
	}

	public String getNickname() {
		return nickname;
	}

	public void setNickname(String nickname) {
		this.nickname = nickname;
	}

	public Integer getIsTopDemo() {
		return isTopDemo;
	}

	public void setIsTopDemo(Integer isTopDemo) {
		this.isTopDemo = isTopDemo;
	}

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public Integer getRefCustomerId() {
		return refCustomerId;
	}

	public void setRefCustomerId(Integer refCustomerId) {
		this.refCustomerId = refCustomerId;
	}

	public Integer getGroupsId() {
		return groupsId;
	}

	public void setGroupsId(Integer groupsId) {
		this.groupsId = groupsId;
	}

	public Integer getIsDemo() {
		return isDemo;
	}

	public void setIsDemo(Integer isDemo) {
		this.isDemo = isDemo;
	}

	public Integer getHeight() {
		return height;
	}

	public void setHeight(Integer height) {
		this.height = height;
	}

	public Integer getWeight() {
		return weight;
	}

	public void setWeight(Integer weight) {
		this.weight = weight;
	}

	public String getNamePrefix() {
		return namePrefix;
	}

	public void setNamePrefix(String namePrefix) {
		this.namePrefix = namePrefix;
	}

	public String getPortraitPath() {
		return portraitPath;
	}

	public void setPortraitPath(String portraitPath) {
		this.portraitPath = portraitPath;
	}

	public Integer getSex() {
		return sex;
	}

	public void setSex(Integer sex) {
		this.sex = sex;
	}

	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	public String getLevel() {
		return level;
	}

	public void setLevel(String level) {
		this.level = level;
	}

	public String getFamilyAddress() {
		return familyAddress;
	}

	public void setFamilyAddress(String familyAddress) {
		this.familyAddress = familyAddress;
	}

	public String getFamilyPhone() {
		return familyPhone;
	}

	public void setFamilyPhone(String familyPhone) {
		this.familyPhone = familyPhone;
	}

	public String getFamilyPostcode() {
		return familyPostcode;
	}

	public void setFamilyPostcode(String familyPostcode) {
		this.familyPostcode = familyPostcode;
	}

	public String getCompanyName() {
		return companyName;
	}

	public void setCompanyName(String companyName) {
		this.companyName = companyName;
	}

	public String getCompanyPostcode() {
		return companyPostcode;
	}

	public void setCompanyPostcode(String companyPostcode) {
		this.companyPostcode = companyPostcode;
	}

	public String getCompanyAddress() {
		return companyAddress;
	}

	public void setCompanyAddress(String companyAddress) {
		this.companyAddress = companyAddress;
	}

	public String getCompanyPhone() {
		return companyPhone;
	}

	public void setCompanyPhone(String companyPhone) {
		this.companyPhone = companyPhone;
	}

	public String getJobTitle() {
		return jobTitle;
	}

	public void setJobTitle(String jobTitle) {
		this.jobTitle = jobTitle;
	}

	public String getJobDuty() {
		return jobDuty;
	}

	public void setJobDuty(String jobDuty) {
		this.jobDuty = jobDuty;
	}

	public String getCellPhone() {
		return cellPhone;
	}

	public void setCellPhone(String cellPhone) {
		this.cellPhone = cellPhone;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public String getQq() {
		return qq;
	}

	public void setQq(String qq) {
		this.qq = qq;
	}

	public Date getBirthday() {
		return birthday;
	}

	public void setBirthday(Date birthday) {
		this.birthday = birthday;
	}

	public Integer getIsConfirm() {
		return isConfirm;
	}

	public void setIsConfirm(Integer isConfirm) {
		this.isConfirm = isConfirm;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public Integer getCareerCategory() {
		return careerCategory;
	}

	public void setCareerCategory(Integer careerCategory) {
		this.careerCategory = careerCategory;
	}

	public String getHobbies() {
		return hobbies;
	}

	public void setHobbies(String hobbies) {
		this.hobbies = hobbies;
	}

	public String getCharacter() {
		return character;
	}

	public void setCharacter(String character) {
		this.character = character;
	}

	public Date getMarriageTime() {
		return marriageTime;
	}

	public void setMarriageTime(Date marriageTime) {
		this.marriageTime = marriageTime;
	}

	/************** Michael 添加 ****************/

	/**
	 * 获取年龄
	 * 
	 * @return
	 */
	public int getAge() {
		return 30;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	/**
	 * 职业类别大写 "一", "二", "三", "四", "五", "六"
	 * 
	 * @return
	 */
	public String getCareerCategoryCn() {
		if (this.careerCategory == null)
			return "未设定";
		if (this.careerCategory == 0 || this.careerCategory > 6)
			return "数据异常";
		String[] num = new String[] { "零", "一", "二", "三", "四", "五", "六" };

		return num[this.careerCategory];
	}

	/**
	 * @return
	 */
	public String getAgeAndCategoryCn() {
		StringBuilder builder = new StringBuilder(10);
		if (sex != null && sex == 1) {
			builder.append("男 | ");
		} else {
			builder.append("女 | ");
		}
		builder.append(getAge()).append("岁 | ");
		builder.append(getCareerCategoryCn());
		builder.append("类");
		return builder.toString();
	}

	@Override
	public boolean equals(Object o) {
		// TODO Auto-generated method stub
		if (!(o instanceof Customer)) {
			return false;
		}
		Customer cus = (Customer) o;
		Field[] fields = o.getClass().getFields();
		Field field = null;
		for (int i = 0; i < fields.length; i++) {
			field = fields[i];
			field.getName();

		}
		return super.equals(o);
	}

}